{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=2838
  Verdict: Accepted
}
var
	a,b,c,d:longint;
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(a,b,c,d);
if a*2+b+c+d>2 then write('YES') else write('NO');
end.